package kr.hkit.powerjava.chapter22.collection;

import java.util.Hashtable;
import java.util.Map;

import kr.hkit.powerjava.chapter22.work2.vo.Student;

public class MapTest {
	public static void main(String[] args) {
		Map<Student, Student> map = new Hashtable<>();
		map.put(new Student(4, "이예준"), new Student(4, "이예준", 80, 79, 65));
		map.put(new Student(1, "김태희"), new Student(1, "김태희", 70, 90, 90));
		map.put(new Student(3, "성효린"), new Student(3, "성효린", 50, 79, 65));
		map.put(new Student(2, "성효린"), new Student(2, "성효린", 60, 79, 65));
		
		for( Map.Entry<Student, Student> s: map.entrySet() ){
			Student std = s.getValue();
			System.out.println(std);
		}

		System.out.println(map.containsKey(new Student(4, "성효린"))?"존재":"존재하지않음");
/*		Map<Integer, Integer> m = new HashMap<>();
		int[] jumsu = {91,90,92, 80,88,79, 67, 50, 49, 99, 40};
		
		for(int a: jumsu){
			Integer r = m.get(a/10);
			m.put(a/10, (r==null)?1:r+1);
		}
		
		System.out.println(Arrays.toString(jumsu));
		for(Map.Entry<Integer, Integer> list: m.entrySet()){
			System.out.println(list.getKey()*10 + "점 대 " + list.getValue() + "명");
		}*/
	}
}










